const colors = ['FFC03F', '65C254', '02AB8E', '32BEFF', '0371CD', '7F72C7', 'BB5193', 'F55275'];

const getTheme = () => {
  let max = colors.length - 1;
  let min = 0;
  let range = max - min;
  let rand = Math.random();
  let num = min + Math.round(rand * range);

  console.log(num);
};

for (let i = 0; i < 50; i++) {
  getTheme();
}
